﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using MyTask.Tasking.Domain.TaskAggregate;
using System;
using System.Collections.Generic;
using System.Text;

namespace MyTask.Tasking.Infrastructure.EntityConfigurations
{
    public class TaskInfoEntityTypeConfiguration : IEntityTypeConfiguration<TaskInfo>
    {
        public void Configure(EntityTypeBuilder<TaskInfo> builder)
        {
            builder.HasKey(p => p.Id);
            builder.ToTable("task_info");
            builder.Property(p => p.TaskName).HasMaxLength(20);
            builder.Property(p => p.StartTime);
            builder.Property(p => p.EndTime);
            builder.Property(p => p.TaskDescrible).HasMaxLength(2000);
            builder.Property(p => p.IsComplete);
            builder.Property(p => p.TaskResult);
            builder.Property(p => p.UserInfoId);
  
        }
    }
}
